package EX2;

import java.io.*;

public class copy_1 {
    public static void main(String[] args) throws IOException {
        File f=new File("C:/filea/a.txt");
        Reader reader=new FileReader(f);
        Writer writer=new FileWriter("C:/filea/a1.txt");
        int n;
        char[] c=new char[10];
        while ((n=reader.read(c))!=-1){
            writer.write(c,0,n);
        }
        reader.close();
        writer.flush();
        writer.close();
    }
}
